# 设置CMake的最低版本要求
cmake_minimum_required(VERSION 3.10)

# 设置项目名称和版本
project(framework_cpp VERSION 1.0)

# 设置C++编译器的标准，比如 C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# 获取PROJECT_SOURCE_DIR的上层目录
# 获取当前CMakeLists.txt文件的绝对路径
get_filename_component(CURRENT_LIST_DIR ${CMAKE_CURRENT_SOURCE_DIR} PATH)

# 获取上一级目录
get_filename_component(PARENT_DIR "${CURRENT_LIST_DIR}" PATH)

message(STATUS "Current directory of PROJECT_SOURCE_DIR is: ${CURRENT_LIST_DIR}")
message(STATUS "Parent directory of PROJECT_SOURCE_DIR is: ${PARENT_DIR}")

# 添加头文件搜索路径
include_directories(
        ${PARENT_DIR}/inc
        # 如果需要，可以添加其他头文件目录
)

# 添加源文件目录
file(GLOB_RECURSE SOURCE_FILES
        #utility
        "${PARENT_DIR}/src/utility/*.cpp"

        #utility
        "${PARENT_DIR}/src/reflect/*.cpp"
        # 根据需要添加其他类型的源文件
)

# 添加可执行文件目标
add_executable(test_reflect ${SOURCE_FILES} test_reflect.cpp)
